package com.pn.warehouse.service;

import com.pn.warehouse.dto.AssignRoleDto;
import com.pn.warehouse.entity.Result;
import com.pn.warehouse.entity.Role;
import com.pn.warehouse.entity.User;
import com.pn.warehouse.page.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

//user_info表的service接口
public interface UserService {

    //根据账号查询用户的信息
    public User fingUserByCode(String userCode);

    //分页查询用户的信息
    public Page queryByUserPage(Page page, User user);

    //添加用户
    public int addUser(User user);

    //启用或者禁用用户的状态
    public int setUserState(User user);

    //给用户分配角色
    public void assignRole(AssignRoleDto assignRoleDto);

    //根据用户的ids逻辑删除用户
    public Result deleteUserById(List<Integer> userIdList);

    //根据用户id修改用户昵称
    public Result updateUserNameById(User user);

    //根据用户id修改密码
    public Result updatePwdById(Integer userId);

}
